﻿/*
 *********************************************************************
 *    Management Extensions for Windows Windows Server AppFabric     *
 *********************************************************************
 *    Author    : Fatih Boy [fatih@enterprisecoding.com]             *
 *    Web site  : http://www.enterprisecoding.com                    *
 *********************************************************************
 *    License   : GNU Library General Public License (LGPL)          * 
 *********************************************************************
 */

using System;
using Microsoft.Web.Management.Server;

namespace Com.Enterprisecoding.AppFabric.Extensions {
    internal sealed class AppFabricExtensionsProvider : ModuleProvider {
        public override ModuleDefinition GetModuleDefinition(IManagementContext context) {
            if (context != null && !string.Equals(context.ClientUserInterfaceTechnology, "System.Windows.Forms.Control", StringComparison.OrdinalIgnoreCase)) {
                return null;
            }
           
            return new ModuleDefinition(base.Name, "Com.Enterprisecoding.AppFabric.Extensions.Client.AppFabricExtensionsModule, " + AssemblyRef.AppFabricExtensionsClient);
        }

        public override bool SupportsScope(ManagementScope scope) {
            return true;
        }

        public override Type ServiceType {
            get { return typeof(AppFabricExtensionsService); }
        }
    }
}